// 导入二次封装好的请求工具
import request from "@/utils/request.js";

// 首页
export function GetIts() {
	return request.get("/api/common/home");
}


// 首页商品列表
export function HomeCommodity(page = 1) {
	return request.get("/api/product/spu/recommend?page=" + page + "&limit=30");
}


// 首页顶部商品列表
export function ComTopList(id) {
	return request.get("/api/store/product/category?pid=" + id);
}

// 首页商品列表
export function CommodityList(id, page = 1) {
	// /api/product / spu / lst ? pid = 804 & page = 1 & limit = 6
	return request.get("/api/product/spu/lst?pid=" + id + "&page=" + page + "&limit=6");
}



// 首页商品详情
export function githomeList(id) {
	return request.get("/api/store/product/detail/" + id);
}

// 热门搜索接口
export function gitkeyword() {
	return request.get("/api/common/hot_keyword");
}


// 搜索接口
export function gitsearchfor(name) {
	return request.get(
		"/api/product/spu/lst?cate_id=&order=&price_on=&price_off=&brand_id=&keyword=" + name +
		"&is_trader=&page=1&limit=30");
}
